home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS064.dsk
/
GEN LEDGER PRINTER.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
11KB
|
171 lines
10 REM PROGRAM DEVELOPED FOR
20 REM SMALL BUSINESS CLIENTS
30 REM BY FRED V. AMUNDSEN, CPA
31 REM 1108 S. WESTHAVEN
32 REM WHEATON, IL 60187
33 REM TEL (312) 668-4833
34 REM
35 REM NOV. 15, 1980
40 REM
50 REM PURPOSE TO PRINT OUT
60 REM GENERAL LEDGER
70 REM TRANSACTIONS USING MODEM
75 TEXT : HOME
80 GOTO 10000: REM MAINLINE
90 REM
100 REM INITIALIZE SUBROUTINE
103 REM ************************* CHANGE STMT 103 & 104 AS APPLICABLE****************
104 CLIENT$ = "SMALL BUSINESS, INC."
106 FYE$ = "6/31/81"
108 LET F$ = "G/L DATA"
109 LET FILLER$ = " "
110 CALL -936: PRINT LEFT$(FILLER$,10);: PRINT CLIENT$: PRINT : PRINT LEFT$(FILLER$,10);: PRINT "FINANCIAL STATEMENTS"
115 PRINT : PRINT LEFT$(FILLER$,11);: PRINT "HARD COPY PRINTOUT"
120 GOSUB 25000: REM PRINT USING MACHINE LANGUAGE SET-UP
130 LET D$ = CHR$(4): REM CONTROL-D
190 DIM A$(35),AA$(7)
200 A$(1) = "MDSE.-MATERIALS"
210 A$(2) = "ACCOUNTING":A$(3) = "ADVERTISING":A$(4) = "AUTO EXPENSE"
220 A$(5) = "SALES DISCOUNTS":A$(6) = "CONTRIBUTIONS":A$(7) = "DEPRECIATION"
230 A$(8) = "ELECTRICITY":A$(9) = "ENTERTAINMENT":A$(10) = "HEALTH INSUR."
240 A$(11) = "HEAT":A$(12) = "INSURANCE":A$(13) = "INTEREST"
250 A$(14) = "LAUNDRY":A$(15) = "LEGAL EXPENSE":A$(16) = "MASTER CHARGE"
260 A$(17) = "MISC. EXP.":A$(18) = "OFFICE EXP":A$(19) = "POSTAGE"
270 A$(20) = "RENT":A$(21) = "REPAIRS":A$(22) = "SELL EXP-G.L"
280 A$(23) = "SELL EXP-R.L.":A$(24) = "SELL EXP-CHRIS":A$(25) = "TAX-SOC SEC"
290 A$(26) = "TAX-FED INC.":A$(27) = "TAX-OTHER":A$(28) = "TELEPHONE"
300 A$(29) = "TRASH":A$(30) = "TRAVELING EXP":A$(31) = "WAGES & COMM"
310 A$(32) = "WATER":A$(33) = "FREIGHT-IN":A$(34) = "FREIGHT-OUT"
320 A$(35) = "UNITED PARCEL":AA$(1) = "NOTES PAYABLE":AA$(2) = "FEDERAL INC TAX"
330 AA$(3) = "ACCTS PAYABLE":AA$(4) = "ACCTS RECEIVABLE":AA$(5) = "ACCT REC-OTHER"
340 AA$(6) = "FIXED ASSETS":AA$(7) = "ACCRUED WAGES"
345 REM
350 DIM E(2,49): REM EXP 1-35 PER DOME, AND 36-42 ARE BAL SHEET A/C PER DOME
360 REM E(I,43)=TOTAL EXPENSES
370 REM E(I,44)=NOT USED
380 REM E(2,45)=CASH
390 REM E(1,45)=OTHER ASSETS
400 REM E(1,46)=INVENTORY
410 REM E(2,46)=DEPOSITS
412 REM E(1,47)=NOT USED
414 REM E(2,47)=ACCRUED TAXES
415 REM E(1,48)=CAPITAL STOCK
416 REM E(2,48)=RET. EARNINGS
417 REM E(I,0)=SALES
420 REM ZERO FILL A/C'S
430 FOR I = 1 TO 2
440 : FOR J = 0 TO 49
450 :: LET E(I,J) = 0
460 : NEXT J
470 NEXT I
480 POKE 10,76: POKE 11,0: POKE 12,3: REM FOR PRINT USING ROUTINE
490 ED$ = " , 0.00": REM DITTO
500 REM ROUTINE TO RECALL DATA FROM DISK
520 PRINT D$;"OPEN";F$
530 PRINT D$;"READ";F$
540 FOR I = 1 TO 2
550 : FOR J = 0 TO 49
560 :: INPUT E(I,J)
570 : NEXT J
580 NEXT I
590 PRINT D$;"CLOSE";F$
999 RETURN
1000 REM SUBROUTINE TO DETERMINE NEEDED FILLER
1010 LET CH = PEEK(36): LET NEEDED = T -CH
1020 IF NEEDED = 0 THEN LET NEEDED = 1
1030 RETURN
10000 REM * * * MAINLINE * * *
10020 GOSUB 100: REM INITIALIZE
10030 PRINT
10040 PRINT "PRINT MONTH": PRINT
10050 INPUT MO$
10060 PRINT : PRINT "PRINT YEAR": PRINT
10070 INPUT YEAR$
10080 PRINT "ADJUST ROLLER. DEPRESS RETURN WHEN READY ": PRINT
10090 INPUT B$
10100 PRINT LEFT$(FILLER$,23);: PRINT CLIENT$
10110 PRINT : PRINT LEFT$(FILLER$,17);: PRINT "BALANCE SHEET AND INCOME STATEMENT"
10120 PRINT : PRINT LEFT$(FILLER$,24);: PRINT MO$;", ";YEAR$: PRINT : PRINT
10130 PRINT "CASH";: LET T = 20: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,45): PRINT "$"; USR( INT(100 *NUM +.5));
10140 PRINT LEFT$(FILLER$,4);: LET T = 15: PRINT "NOTES PAYABLE";: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,36): PRINT "$"; USR( INT(NUM *100 +.5) *( -1))
10150 PRINT "ACCOUNTS RECEIVABLE";: LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,39): PRINT USR( INT(100 *NUM +.5));: PRINT LEFT$(FILLER$,4);
10160 PRINT "ACCOUNTS PAYABLE";: LET T = 16: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,38): PRINT USR( INT(100 *NUM +.5) *( -1))
10170 PRINT "ACCTS REC-OTHER";: LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,40): PRINT USR( INT(100 *NUM +.5));: PRINT LEFT$(FILLER$,4);
10180 PRINT "ACCRUED TAXES";: LET T = 16: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,47): PRINT USR( INT(100 *NUM +.5) *( -1))
10190 PRINT "INVENTORY";: LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(1,46): PRINT USR( INT(100 *NUM +.5));: PRINT LEFT$(FILLER$,4);
10200 PRINT "ACCRUED WAGES";: LET T = 16: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,42): PRINT USR( INT(100 *NUM +.5) *( -1))
10210 PRINT "EQUIPMENT";: LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,41): PRINT USR( INT(100 *NUM +.5));: PRINT LEFT$(FILLER$,4);
10220 PRINT "CAPITAL STOCK";: LET T = 16: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(1,48): PRINT USR( INT(100 *NUM +.5) *( -1))
10230 PRINT "DEPOSITS";: LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,46): PRINT USR( INT(100 *NUM +.5));: PRINT LEFT$(FILLER$,4);
10240 PRINT "RETAINED EARNINGS";: LET T = 16: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,48): PRINT USR( INT(100 *NUM +.5) *( -1))
10250 PRINT "OTHER ASSETS";: LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(1,45): PRINT USR( INT(100 *NUM +.5));: PRINT LEFT$(FILLER$,4);
10260 PRINT "PROFIT AND LOSS ";: LET T = 16: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,0) +E(2,43): PRINT USR( INT(100 *NUM +.5) *( -1))
10280 PRINT "TOTAL ASSETS";: LET T = 20: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,45) +E(2,39) +E(2,40) +E(1,46) +E(2,46) +E(1,45) +E(2,41)
10290 PRINT "$"; USR( INT(100 *NUM +.5));: PRINT LEFT$(FILLER$,4);
10300 PRINT "TOTAL LIAB & CAP";: LET T = 15: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(2,36) +E(2,38) +E(2,47) +E(1,48) +E(2,48) +E(2,42) +E(2,0) +E(2,43)
10310 PRINT "$"; USR( INT(100 *NUM +.5) *( -1))
10320 REM TO PRINT P&L
10330 PRINT : PRINT LEFT$(FILLER$,22);: PRINT "INCOME STATEMENT"
10340 PRINT
10350 PRINT LEFT$(FILLER$,22);MO$;: PRINT LEFT$(FILLER$,29);"YTD"
10360 PRINT "SALES";: LET T = 20: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: PRINT "$"; USR( INT(100 *E(1,0) +.5) *( -1));
10370 PRINT LEFT$(FILLER$,24);: PRINT "$"; USR( INT(100 *E(2,0) +.5))
10380 PRINT
10390 FOR I = 1 TO 35
10400 : IF E(2,I) = 0 THEN GOTO 10430
10405 IF I = 26 THEN GOTO 10430
10410 :: PRINT A$(I);: LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: PRINT ; USR( INT(100 *E(1,I) +.5));
10420 PRINT LEFT$(FILLER$,25);: PRINT ; USR( INT(100 *E(2,I) +.5))
10430 NEXT I
10440 PRINT
10445 LET TE = E(1,43) -E(1,26)
10450 PRINT "TOTAL EXPENSE";: LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: PRINT ; USR( INT(100 *TE +.5));
10455 LET TE = E(2,43) -E(2,26)
10460 PRINT LEFT$(FILLER$,25);: PRINT ; USR( INT(100 *TE +.5))
10470 PRINT
10480 LET CP = E(1,43) +E(1,0) -E(1,26): REM CURRENT PERIOD PROFIT BEFORE TAX
10485 PRINT "PROFIT BEFORE"
10490 PRINT "FEDERAL TAX";: LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: PRINT USR( INT(100 *CP +.5) *( -1));
10493 PRINT LEFT$(FILLER$,25);
10495 LET PL = E(2,43) -E(2,26) +E(2,0)
10500 PRINT USR( INT(100 *PL +.5) *( -1))
10510 PRINT : PRINT "PROVISION FOR"
10515 PRINT "FEDERAL TAX";
10520 LET NUM = E(1,27): LET T = 21: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: LET NUM = E(1,26): PRINT USR( INT(100 *NUM +.5));
10530 PRINT LEFT$(FILLER$,25);: LET NUM = E(2,26): PRINT USR( INT(100 *NUM +.5))
10540 PRINT : PRINT "NET PROFIT";
10550 LET PL = E(1,43) +E(1,0)
10560 LET T = 20: GOSUB 1000: PRINT LEFT$(FILLER$,NEEDED);: PRINT "$"; USR( INT(100 *PL +.5) *( -1));
10570 LET PL = E(2,43) +E(2,0)
10580 PRINT LEFT$(FILLER$,24);: PRINT "$"; USR( INT(100 *PL +.5) *( -1))
10999 FOR I = 1 TO 22: PRINT : NEXT
11000 END
14999 END
24999 REM SUBROUTINE TO ESTABLISH PRINT USING FORMAT
25000 POKE 768,165: POKE 769,82: POKE 770,72: POKE 771,32: POKE 772,43: POKE 773,37: POKE 774,32: POKE 775,222: POKE 776,27
25001 POKE 777,104: POKE 778,133: POKE 779,82: POKE 780,169: POKE 781,69: POKE 782,162: POKE 783,196: POKE 784,133: POKE 785,129
25002 POKE 786,134: POKE 787,130: POKE 788,32: POKE 789,76: POKE 790,24: POKE 791,160: POKE 792,4: POKE 793,177: POKE 794,155
25003 POKE 795,133: POKE 796,132: POKE 797,136: POKE 798,177: POKE 799,155: POKE 800,133: POKE 801,131: POKE 802,136: POKE 803,177
25004 POKE 804,155: POKE 805,201: POKE 806,16: POKE 807,144: POKE 808,2: POKE 809,169: POKE 810,16: POKE 811,133: POKE 812,208
25005 POKE 813,168: POKE 814,136: POKE 815,177: POKE 816,131: POKE 817,153: POKE 818,240: POKE 819,2: POKE 820,136: POKE 821,16
25006 POKE 822,248: POKE 823,160: POKE 824,0: POKE 825,185: POKE 826,0: POKE 827,1: POKE 828,240: POKE 829,3: POKE 830,200
25007 POKE 831,208: POKE 832,248: POKE 833,166: POKE 834,208: POKE 835,136: POKE 836,185: POKE 837,0: POKE 838,1: POKE 839,72
25008 POKE 840,104: POKE 841,72: POKE 842,201: POKE 843,45: POKE 844,208: POKE 845,14: POKE 846,189: POKE 847,239: POKE 848,2
25009 POKE 849,201: POKE 850,45: POKE 851,144: POKE 852,22: POKE 853,202: POKE 854,208: POKE 855,240: POKE 856,104: POKE 857,24
25010 POKE 858,144: POKE 859,53: POKE 860,189: POKE 861,239: POKE 862,2: POKE 863,201: POKE 864,32: POKE 865,240: POKE 866,8
25011 POKE 867,201: POKE 868,58: POKE 869,240: POKE 870,238: POKE 871,201: POKE 872,48: POKE 873,144: POKE 874,234: POKE 875,104
25012 POKE 876,157: POKE 877,239: POKE 878,2: POKE 879,202: POKE 880,240: POKE 881,31: POKE 882,192: POKE 883,0: POKE 884,208
25013 POKE 885,205: POKE 886,232: POKE 887,24: POKE 888,144: POKE 889,16: POKE 890,189: POKE 891,239: POKE 892,2: POKE 893,201
25014 POKE 894,36: POKE 895,240: POKE 896,16: POKE 897,201: POKE 898,46: POKE 899,176: POKE 900,5: POKE 901,169: POKE 902,32
25015 POKE 903,157: POKE 904,239: POKE 905,2: POKE 906,202: POKE 907,240: POKE 908,4: POKE 909,228: POKE 910,208: POKE 911,144
25016 POKE 912,233: POKE 913,162: POKE 914,1: POKE 915,189: POKE 916,239: POKE 917,2: POKE 918,32: POKE 919,95: POKE 920,19
25017 POKE 921,232: POKE 922,228: POKE 923,208: POKE 924,144: POKE 925,245: POKE 926,189: POKE 927,239: POKE 928,2: POKE 929,73
25018 POKE 930,48: POKE 931,168: POKE 932,169: POKE 933,0: POKE 934,76: POKE 935,235: POKE 936,26
25019 LET RAM = 0
25020 IF PEEK(57344) = 32 THEN RAM = 1: REM TEST FOR RAM APPLESOFT
25030 IF RAM THEN RETURN : REM ABOVE POKES ARE FOR RAM APPLESOFT. BELOW IS ADJUSTMENT FOR LANGUAGE CARD OR ROM APPLESOFT
25040 POKE 772,52: POKE 773,237: POKE 774,32: POKE 775,231: POKE 776,227
25050 POKE 789,83: POKE 790,224
25060 POKE 919,92: POKE 920,219
25070 POKE 935,242: POKE 936,226
25080 RETURN : REM SEE OCTOBER, 1980 MICRO MAGAZINE, PAGE 14, ARTICLE BY GARY A. MORRIS FOR DETAILS ON HIS PRINT USING ROUTINE.